<template>
  <el-header>
    <span class="l-content">
      <img src="../assets/icons/main-logo.png" alt="" />
    </span>
    <span class="r-content">
      <!-- <el-button @click="handleClick">数据中心</el-button> -->
      <el-button>APP下载</el-button>
      <span v-if="depName">{{ depName }}</span>
    </span>
  </el-header>
</template>

<script setup>
import { onMounted } from 'vue';
import { getListGroup } from '../api/index'

let depName = ref()
onMounted(() => {
  getListData()
})

const getListData = () => {
  setTimeout(() => {
    getListGroup().then((res) => {
     if (res.data.data) {
       console.log(res,'res')
      depName.value =  res.data.data[0].fullName
    }
  })
}, 300)
}
</script>
<style scoped>
* {
  margin: 0;
  padding: 0;
}

.el-header {
  padding: 0;
}

img {
  /* margin-left: -20px; */
  height: 60px;
}

.r-content {
  float: right;
  line-height: 60px;
}

.el-button {
  padding: 10px;
}

.r-content span {
  margin-left: 20px;
}
</style>